import request from '@/utils/request'

// 总代角色列表
export function getGeneralRoleList(params: any) {
  return request({
    url: '/v1/admin/manager/getManagerRoleList',
    method: 'get',
    params: params
  })
}

// 新增-总代角色
export function addGeneralRole(data: any) {
  return request({
    url: '/v1/admin/manager/insertManagerRole',
    method: 'post',
    data: data
  })
}

// 修改-总代角色
export function editGeneralRole(data: any) {
  return request({
    url: '/v1/admin/manager/updateManagerRole',
    method: 'put',
    data: data
  })
}

// 删除-总代角色
export function deleteGeneralRole(data: any) {
  return request({
    url: '/v1/admin/manager/deleteManagerRole',
    method: 'post',
    data: data
  })
}

// 权限-总代角色
export function getPermissionList(data: any) {
  return request({
    url: '/v1/admin/permission/manager/getTree',
    method: 'get',
    data: data
  })
}

// 总代账号列表
export function getGeneralAccountList(params: any) {
  return request({
    url: '/v1/admin/account/getManagerAccountList',
    method: 'get',
    params: params
  })
}

// 新增-总代账号
export function addGeneralAccount(data: any) {
  return request({
    url: '/v1/admin/account/insertAccountManagerAccount',
    method: 'post',
    data: data
  })
}

// 修改-总代账号
export function editGeneralAccount(data: any) {
  return request({
    url: '/v1/admin/account/updateManagerAccount',
    method: 'put',
    data: data
  })
}

// 删除-总代账号
export function deleteGeneralAccount(data: any) {
  return request({
    url: '/v1/admin/account/deleteManagerAccount',
    method: 'post',
    data: data
  })
}
